SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[paListadoLicenicasDocentes2007] AS
SET NOCOUNT ON
SET DATEFORMAT DMY
SELECT     TOP 100 PERCENT L.Documento, A.Apellido, A.Nombre, L.Licencia, L.Aplicacion, L.Dias
FROM         dbo.Tb_LicenciasEntreFechasDeTodosLosAgentes2007 L INNER JOIN
                      dbo.tb_Agentes A ON A.Documento = L.Documento
WHERE     (L.Dias > 0)
ORDER BY A.Apellido, A.Nombre
GO
